<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
   <head>
    <meta charset="utf-8">
    <title>Bootstrap Admin</title>
    <meta content="IE=edge,chrome=1" http-equiv="X-UA-Compatible">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="">
    <meta name="author" content="">

    <link rel="stylesheet" type="text/css" href="css/bootstrap.css">
    
    <link rel="stylesheet" type="text/css" href="css/theme.css">
    <link rel="stylesheet" href="css/font-awesome.css">

    <script src="js/jquery-1.7.2.min.js" type="text/javascript"></script>

    <!-- Demo page code -->

    <style type="text/css">
        #line-chart {
            height:300px;
            width:800px;
            margin: 0px auto;
            margin-top: 1em;
        }
        .brand { font-family: georgia, serif; }
        .brand .first {
            color: #ccc;
            font-style: italic;
        }
        .brand .second {
            color: #fff;
            font-weight: bold;
        }
    </style>

   
  </head>

  <!--[if lt IE 7 ]> <body class="ie ie6"> <![endif]-->
  <!--[if IE 7 ]> <body class="ie ie7 "> <![endif]-->
  <!--[if IE 8 ]> <body class="ie ie8 "> <![endif]-->
  <!--[if IE 9 ]> <body class="ie ie9 "> <![endif]-->
  <!--[if (gt IE 9)|!(IE)]><!--> 
  <body class=""> 
  <!--<![endif]-->
    
    <div class="navbar">
        <div class="navbar-inner">
           <a class="brand" href="${pageContext.request.contextPath }/UserServlet?method=state"><span class="first">改进后JDBC</span> </a>
        </div>
    </div>
    

    <div class="sidebar-nav">
        <a href="${pageContext.request.contextPath }/UserServlet?method=selectT10" class="nav-header" ><i class="icon-question-sign"></i>t10全表查询</a>
        <a href="${pageContext.request.contextPath }/UserServlet?method=selectT20" class="nav-header" ><i class="icon-question-sign"></i>t20全表查询</a>
        <a href="${pageContext.request.contextPath }/UserServlet?method=selectT30" class="nav-header" ><i class="icon-question-sign"></i>t30全表查询</a>
        <a href="${pageContext.request.contextPath }/UserServlet?method=selectT40" class="nav-header" ><i class="icon-question-sign"></i>t40全表查询</a>
        <a href="${pageContext.request.contextPath }/UserServlet?method=select_with_where" class="nav-header" ><i class="icon-comment"></i>缓存查询（带where条件）</a>
        <a href="${pageContext.request.contextPath }/right.jsp" class="nav-header" ><i class="icon-comment"></i>插入数据</a>
        <a href="${pageContext.request.contextPath }/update.jsp" class="nav-header" ><i class="icon-comment"></i>更新数据</a>
        <a href="${pageContext.request.contextPath }/delete.jsp" class="nav-header" ><i class="icon-comment"></i>删除数据</a>
         
    </div>    

    
    <div class="content">
      <div class="header">
       <h1 class="page-title">缓存查询（带where条件）</h1>
        <span style="color:red">查询时间：${time } 毫秒</span>
        
        <form action="${pageContext.request.contextPath }/UserServlet?method=select_with_where" method="post">
         <div style="padding:50px;">
         <span style="font-weight:bold;font-size:20px;padding-right:10px;">SQL语句</span>
         <input type="text" style="height:40px;width:600px;" id="name" name="sql"  value="${sql}" />
         <button type="submit" style="margin:10px;"  class="button bg-main">提交</button>
         </div>
        
        
       </form>
        
     </div>
     <div class="well">
      <table class="table">
       <thead>
        <tr>
          <th>#</th>
          <th>Id</th>
          <th>accesstime</th>
          <th>userid</th>
          <th>keyword</th>
          <th>ranked_clickno</th>
          <th>clickurl </th>
          
        </tr>
      </thead>
      <tbody>
         <c:forEach items="${wxScoreInTrades}" var="wx"  varStatus="status">
             <tr>
               <td>${status.count}</td>
               <td>${wx.id }</td>
               <td>${wx.accesstime }</td>
               <td>${wx.userid }</td>
               <td>${wx.keyword }</td>
               <td >${wx.ranked_clickno }</td>
               <td>${wx.clickurl }</td> 
             </tr>
            </c:forEach>
      </tbody>
    </table>
   </div>
  </div>
    


   
  </body>
</html>
